# -*- coding: utf-8 -*-#
import yaml
import os


def get_fail():
    get_dir = os.path.dirname(os.path.abspath(__file__))
    filepath = os.path.join(get_dir, 'account.yaml')
    with open(filepath, mode='r', encoding='utf-8') as fp:
        get_result = yaml.load(fp, Loader=yaml.SafeLoader)
        result = get_result['login_fail']
        return result


def get_success():
    get_dir = os.path.dirname(os.path.abspath(__file__))
    filepath = os.path.join(get_dir, 'account.yaml')
    with open(filepath, mode='r', encoding='utf-8') as fp:
        get_result = yaml.load(fp, Loader=yaml.SafeLoader)
        result = get_result['login_success']
        return result


def get_data():
    get_dir = os.path.dirname(os.path.abspath(__file__))
    filepath = os.path.join(get_dir, 'data.yaml')
    with open(filepath, mode='r', encoding='utf-8') as fp:
        get_result = yaml.load(fp, Loader=yaml.SafeLoader)
        result = get_result['Email_information']
        return result


# print(get_fail())
# print(get_success())

if __name__ == '__main__':
    text = get_fail()
    text1 = get_success()
    text2 = get_data()
    print(text)
    print(text1)
    print(text2)